class_name Buff_ChangeMoveSpeed
extends Buff

@export var change_scale:float

func init_buff(provider:Node,buff_agent:BuffComponent):
	super.init_buff(provider,buff_agent)
	on_level_changed.connect(on_level_change_callback)
	
func on_level_change_callback(change_value:int):
	var data = cur_buff_agent.cur_entity.get_entity_data()
	if "move_speed_scale" in data:
		if change_value > 0:
			data.move_speed_scale += change_scale
		elif change_value < 0:
			data.move_speed_scale -= change_scale
